<?php
/**
 * @version 0.8.3 2010-10-07
 * @package Joomla
 * @subpackage LeagueResults
 * @copyright (C)  2008, 2009, 2010 Henryk Drozd
 * @license GNU/GPL, see LICENSE.php
 * LeagueResults is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * LeagueResults is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');?>

<div class="componentheading">
<?php echo JText::_( 'PLAYERS OF THE TEAM' ); ?>
</div>

<a href="<? echo $this->backlink; ?>">
	<?php echo JText::_( 'RETURN TO TEAM LIST' ); ?>
</a><br/><br/>
<table class="teamheading" >
<tr><td>
		<?php if ($this->settings->frontend_images == 1) {?>
				<img src="<?php echo $this->settings->tbadge_folder.$this->list[0]->tbadge; ?>" />
				<?php }?>
	
	<? echo $this->list[0]->teamname; ?></td>
</table>
<table class="playerstable" >
<tr>
	<td class="lr_label"><?php echo JText::_( 'PLAYER' ); ?></td>
	<td class="lr_label"><?php echo JText::_( 'POSITION' ); ?></td>
	<td class="lr_label"><?php echo JText::_( 'NATIONALITY' ); ?></td>
	<td class="lr_label"><?php echo JText::_( 'BIRTHDAY' ); ?></td>
	<td class="lr_label"><?php echo JText::_( 'HEIGHT' ); ?></td>
	<td class="lr_label"><?php echo JText::_( 'SEASON' ); ?></td>

	</tr>

<?php foreach ($this->list as $l): 
		if (($l->role == 'Player')||($l->role == '')){
?>
<tr>
	<td><a href="<?php echo $l->link; ?>">
	<?php if ($this->settings->frontend_images == 1) {?>
			<img src="<?php echo $this->settings->pimage_folder.$l->picture; ?>" />
			<br/>
			<?php }?>
		<?php echo $l->lastname.', '.$l->firstname; ?></a></td>
	<td><?php echo $l->position; ?></td>
	<td><?php echo $l->nationality; ?></td>
	
	<td><?php echo (($l->birthday<>'0000-00-00')?date($this->settings->dateformat, strtotime($l->birthday.' 00:00:00')):'&nbsp;'); ?></td>
	<td><?php echo htmlspecialchars($l->height, ENT_QUOTES, 'UTF-8').'&nbsp;'; ?></td>
	<td><?php echo $l->season.' '.$l->syear; ?></td>

</tr>
<?php
		}
endforeach; ?>
</table>

<table class="playerstable" >


<?php foreach ($this->list as $l): 
		if ($l->role == 'Coach'){
?>
<tr>
	<td><a href="<?php echo $l->link; ?>">
	<?php if ($this->settings->frontend_images == 1) {?>
			<img src="<?php echo $this->settings->pimage_folder.$l->picture; ?>" />
			<br/>
			<?php }?>
		<?php echo $l->lastname.', '.$l->firstname; ?></a></td>
	<td><?php echo $l->position; ?></td>
	<td><?php echo $l->nationality; ?></td>
	<td><?php echo (($l->birthday<>'0000-00-00')?
		date($this->settings->dateformat, strtotime($l->birthday.' 00:00:00'))
		:'&nbsp;'); ?></td>
	<td><?php echo $l->season.' '.$l->syear; ?></td>
	
</tr>
<?php
		}
endforeach; ?>
</table>

